<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="complaintList.title"/></title>
    <meta name="heading" content="<fmt:message key='complaintDetail.heading'/>"/>
    <meta name="menu" content="PersonMenu"/>
</head>

<c:set var="buttons">
    <input type="button" style="margin-right: 5px"
        onclick="location.href='<c:url value="/complaintform.html"/>'"
        value="<fmt:message key="button.add"/>"/>

    <input type="button" onclick="location.href='<c:url value="/mainMenu.html"/>'"
        value="<fmt:message key="button.done"/>"/>
</c:set>

<c:out value="${buttons}" escapeXml="false"/>

<display:table name="complaintList" cellspacing="0" cellpadding="0" requestURI=""
    id="complaintList" pagesize="25" class="table complaintList" export="true">

    <display:column property="id" escapeXml="true" sortable="true"
        url="/complaintform.html" paramId="id" paramProperty="id" titleKey="complaint.id"/>
    <display:column property="complaintDate" titleKey="complaint.date" format="{0,date,MM/dd/yyyy}" sortable="true"/>
    <display:column property="initialComplaint.businessName" titleKey="business.name" sortable="true" escapeXml="true"/>
    <display:column property="initialComplaint.businessAddress1" titleKey="business.address" sortable="true" escapeXml="true"/>
    <display:column property="initialComplaint.businessCity" titleKey="business.city" sortable="true" escapeXml="true"/>
    <display:column property="initialComplaint.businessZip" titleKey="business.zip" sortable="true"/>

    <display:setProperty name="paging.banner.item_name" value="person"/>
    <display:setProperty name="paging.banner.items_name" value="people"/>

    <display:setProperty name="export.excel.filename" value="ComplaintList.xls"/>
    <display:setProperty name="export.csv.filename" value="ComplaintList.csv"/>
    <display:setProperty name="export.pdf.filename" value="ComplaintList.pdf"/>
</display:table>

<c:out value="${buttons}" escapeXml="false"/>

<script type="text/javascript">
    highlightTableRows("complaintList");
</script>